import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/user_profile/index.vue'),
      meta: {
        title: '用户信息',
      },
    },
  ],
})
// 后置守卫
router.afterEach((route) => {
  document.title = route.meta.title as string
})
export default router
